const ImCommon = {
  state: {
    isRegister: false,
    username: ""
  },
  mutations: {
    setUserName(state, username) {
      state.username = username
    },
    setRegisterFlag(state, flag) {
      state.isRegister = flag
    }
  },
  actions: {
    onLogin: function () {
      // context.commit("setUserName", payload.username);
      // var options = {
      //   apiUrl: Jim.config.apiURL,
      //   user: payload.username,
      //   pwd: payload.password,
      //   appKey: Jim.config.appkey
      // };
      // // Jim.conn(payload.username, payload.password);
      // localStorage.setItem("userInfo", JSON.stringify({ userId: payload.username, password: payload.password }));
      // localStorage.setItem("userInfo_imId", payload.username);
    },


  },
}
export default ImCommon


